package com.ccxe.manage.service.page.bean;

import java.util.List;

public class PageBean {

	private String servletUrl;
	private List<?> datalist;
	private int nowPage = 1;
	private int showData = 10;
	private int pageShowData = 10;
	private int totalPage = 0;
	private int totalData = 0;
	private String pageName;
	private int[] sortFlg;
	private int sortType;
	private String title;
	private String sortTypeStr;
	private List<?> pdatalist;
	private String extraUrlParam; // servletUrl的附加参数，举例：“&userName=abc”
	private String startDate;
	private String endDate;
	private String bondCode;
	private String opType;

	public String getOpType() {
		return opType;
	}

	public void setOpType(String opType) {
		this.opType = opType;
	}

	public String getStartDate() {
		return startDate;
	}

	public void setStartDate(String startDate) {
		this.startDate = startDate;
	}

	public String getEndDate() {
		return endDate;
	}

	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}

	public String getBondCode() {
		return bondCode;
	}

	public void setBondCode(String bondCode) {
		this.bondCode = bondCode;
	}

	public List<?> getPdatalist() {
		return pdatalist;
	}

	public void setPdatalist(List<?> pdatalist) {
		this.pdatalist = pdatalist;
	}

	public String getSortTypeStr() {
		return sortTypeStr;
	}

	public void setSortTypeStr(String sortTypeStr) {
		this.sortTypeStr = sortTypeStr;
	}

	public String getSortColumn() {
		return sortColumn;
	}

	public void setSortColumn(String sortColumn) {
		this.sortColumn = sortColumn;
	}

	private String sortString;
	private String showNowTitle;
	private String sortColumn;

	public String getShowNowTitle() {
		return showNowTitle;
	}

	public void setShowNowTitle(String showNowTitle) {
		this.showNowTitle = showNowTitle;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getSortString() {
		return sortString;
	}

	public void setSortString(String sortBy) {
		this.sortString = sortBy;
	}

	public int getSortType() {
		return sortType;
	}

	public void setSortType(int sortType) {
		this.sortType = sortType;
	}

	public int[] getSortFlg() {
		return sortFlg;
	}

	public void setSortFlg(int[] sortFlg) {
		this.sortFlg = sortFlg;
	}

	public String getServletUrl() {
		return servletUrl;
	}

	public void setServletUrl(String servletUrl) {
		this.servletUrl = servletUrl;
	}

	public List<?> getDatalist() {
		return datalist;
	}

	public void setDatalist(List<?> datalist) {
		this.datalist = datalist;
	}

	public int getNowPage() {
		return nowPage;
	}

	public void setNowPage(int nowPage) {
		this.nowPage = nowPage;
	}

	public int getShowData() {
		return showData;
	}

	public void setShowData(int showData) {
		this.showData = showData;
	}

	public int getPageShowData() {
		return pageShowData;
	}

	public void setPageShowData(int pageShowData) {
		this.pageShowData = pageShowData;
	}

	public int getTotalPage() {
		return totalPage;
	}

	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}

	public int getTotalData() {
		return totalData;
	}

	public void setTotalData(int totalData) {
		this.totalData = totalData;
	}

	public String getPageName() {
		return pageName;
	}

	public void setPageName(String pageName) {
		this.pageName = pageName;
	}

	public int computeTotalPage() {
		if (totalData == 0) {
			return new Integer(0);
		}

		Integer result = this.totalData % this.showData;
		Integer result2 = this.totalData / this.showData;
		if (result != 0) {
			return result2 + 1;
		} else if (result == 0) {
			return result2;
		}

		return new Integer(1);
	}

	public String getExtraUrlParam() {
		return extraUrlParam;
	}

	public void setExtraUrlParam(String extraUrlParam) {
		this.extraUrlParam = extraUrlParam;
	}
}
